<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>小林下载工具包 - 设置</title>
    <style>
        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
            color: #333;
        }
        
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        
        header {
            display: flex;
            align-items: center;
            margin-bottom: 30px;
        }
        
        header img {
            width: 48px;
            height: 48px;
            margin-right: 15px;
        }
        
        h1 {
            font-size: 24px;
            font-weight: 500;
            margin: 0;
        }
        
        .card {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            overflow: hidden;
        }
        
        .card-header {
            background-color: #f8f9fa;
            padding: 15px 20px;
            border-bottom: 1px solid #e0e0e0;
        }
        
        .card-header h2 {
            margin: 0;
            font-size: 18px;
            font-weight: 500;
        }
        
        .card-body {
            padding: 20px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group:last-child {
            margin-bottom: 0;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        select, input[type="text"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            box-sizing: border-box;
        }
        
        .checkbox-group {
            display: flex;
            align-items: center;
        }
        
        .checkbox-group input[type="checkbox"] {
            margin-right: 10px;
        }
        
        .checkbox-group label {
            margin-bottom: 0;
            font-weight: normal;
        }
        
        .file-type-filters {
            margin-top: 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 10px;
            max-height: 200px;
            overflow-y: auto;
        }
        
        .file-type-item {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        
        .file-type-item:last-child {
            margin-bottom: 0;
        }
        
        .file-type-item input[type="checkbox"] {
            margin-right: 10px;
        }
        
        .file-type-item label {
            margin-bottom: 0;
            font-weight: normal;
        }
        
        .actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
        }
        
        button {
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        button.primary {
            background-color: #2196F3;
            color: white;
        }
        
        button.primary:hover {
            background-color: #1976D2;
        }
        
        button.secondary {
            background-color: #f5f5f5;
            color: #333;
            margin-right: 10px;
        }
        
        button.secondary:hover {
            background-color: #e0e0e0;
        }
        
        .status-message {
            padding: 10px;
            border-radius: 4px;
            margin-top: 20px;
            display: none;
        }
        
        .status-message.success {
            background-color: #E8F5E9;
            color: #2E7D32;
            border-left: 4px solid #4CAF50;
        }
        
        .status-message.error {
            background-color: #FFEBEE;
            color: #C62828;
            border-left: 4px solid #F44336;
        }
        
        .about-section {
            font-size: 14px;
            color: #666;
            line-height: 1.5;
        }
        
        .about-section a {
            color: #2196F3;
            text-decoration: none;
        }
        
        .about-section a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <img src="icons/icon48.ico" alt="小林下载工具包">
            <h1>小林下载工具包 - 设置</h1>
        </header>
        
        <div class="card">
            <div class="card-header">
                <h2>下载设置</h2>
            </div>
            <div class="card-body">
                <div class="form-group">
                    <label for="defaultDownloader">默认下载器</label>
                    <select id="defaultDownloader">
                        <option value="chrome">Chrome 默认下载器</option>
                        <option value="thunder">迅雷</option>
                        <option value="idm">Internet Download Manager</option>
                    </select>
                </div>
                
                <div class="form-group checkbox-group">
                    <input type="checkbox" id="showPopupOnDownload" checked>
                    <label for="showPopupOnDownload">下载前显示确认弹窗</label>
                </div>
                
                <div class="form-group checkbox-group">
                    <input type="checkbox" id="rememberLastPath" checked>
                    <label for="rememberLastPath">记住上次保存位置</label>
                </div>
                
                <div class="form-group">
                    <label for="lastSavePath">默认保存位置</label>
                    <input type="text" id="lastSavePath" placeholder="默认使用浏览器下载目录">
                </div>
            </div>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>文件类型过滤</h2>
            </div>
            <div class="card-body">
                <p>选择要使用此工具包处理的文件类型：</p>
                
                <div class="file-type-filters">
                    <div class="file-type-item">
                        <input type="checkbox" id="videoFiles" checked>
                        <label for="videoFiles">视频文件 (mp4, avi, mkv, flv, mov, wmv)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="audioFiles" checked>
                        <label for="audioFiles">音频文件 (mp3, wav, flac, aac, ogg)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="documentFiles" checked>
                        <label for="documentFiles">文档文件 (pdf, doc, docx, xls, xlsx, ppt, pptx)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="archiveFiles" checked>
                        <label for="archiveFiles">压缩文件 (zip, rar, 7z, tar, gz)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="executableFiles">
                        <label for="executableFiles">可执行文件 (exe, msi, dmg, apk)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="imageFiles" checked>
                        <label for="imageFiles">图像文件 (jpg, jpeg, png, gif, bmp, svg)</label>
                    </div>
                    <div class="file-type-item">
                        <input type="checkbox" id="otherFiles" checked>
                        <label for="otherFiles">其他文件类型</label>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>安全设置</h2>
            </div>
            <div class="card-body">
                <div class="form-group checkbox-group">
                    <input type="checkbox" id="enableSafetyCheck" checked>
                    <label for="enableSafetyCheck">启用下载安全检查</label>
                </div>
                
                <div class="form-group checkbox-group">
                    <input type="checkbox" id="blockUnsafeDownloads">
                    <label for="blockUnsafeDownloads">阻止不安全的下载</label>
                </div>
            </div>
        </div>
        
        <div class="actions">
            <button class="secondary" id="resetBtn">恢复默认设置</button>
            <button class="primary" id="saveBtn">保存设置</button>
        </div>
        
        <div class="status-message success" id="successMessage">
            设置已成功保存！
        </div>
        
        <div class="status-message error" id="errorMessage">
            保存设置时出错，请重试。
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>关于</h2>
            </div>
            <div class="card-body">
                <div class="about-section">
                    <p>小林下载工具包 v1.0.0</p>
                    <p>一个简单易用的浏览器下载管理扩展，支持多种下载工具。</p>
                    <p>© 2023 小林工作室</p>
                </div>
            </div>
        </div>
    </div>
    
    <script src="settings.js"></script>
</body>
</html>